package chatRoom.com.fenwe.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import chatRoom.com.fenwe.controller.data.QueryUserRequest;
import chatRoom.com.fenwe.controller.response.BaseResponse;
import chatRoom.com.fenwe.controller.response.FailResponse;
import chatRoom.com.fenwe.dao.entity.CompanyDO;
import chatRoom.com.fenwe.service.ICompanyService;

@RestController
@RequestMapping(value = "/company", produces = "application/json;charset=UTF-8")
public class CompanyController {
    @Autowired
    private ICompanyService companyService;

    @RequestMapping("/queryCompany")
    public BaseResponse queryUserById() {
        try {
            List<CompanyDO> companyDOs = companyService.queryCompany();
            return new BaseResponse(200, "请求成功", companyDOs);
        } catch (Exception e) {
            e.printStackTrace();
            return new FailResponse(e);
        }
    }

}
